package com.wish;

/**
 * Created by suliucheng on 2021/1/6 20:43
 * Directions:
 */
public class HouseDesigner {

    private AbstractHouseBuilder abstractHouseBuilder;

    public HouseDesigner(AbstractHouseBuilder abstractHouseBuilder) {
        this.abstractHouseBuilder = abstractHouseBuilder;
    }

    public void setAbstractHouseBuilder(AbstractHouseBuilder abstractHouseBuilder) {
        this.abstractHouseBuilder = abstractHouseBuilder;
    }

    public House build() {
        abstractHouseBuilder.buildFoundation();
        abstractHouseBuilder.buildBasicWalls();
        abstractHouseBuilder.buildHeight();
        return abstractHouseBuilder.getHouse();
    }
}
